<template>
    <div>

    </div>
</template>

<script setup>

// eslint-disable-next-line no-unused-vars
import { useRoute, useRouter } from 'vue-router';
import axios from "@/utils/axios"
import { Toast } from "vant";

const route = useRoute()
const router = useRouter()
if (route.params != null) {
    if (route.params.code == null || route.params.code == "") {
        router.back();
    }
    const code = route.params.code;
    axios({
        method: 'get',
        url: "/api/GetWxNo?code=" + code
    }).then(res => {
        if (res == "") {
            Toast.fail({ overlay: true, message: '错误' })
        } else {
            sessionStorage.setItem("openId", res)
            location.search = '';
        }
    })
} else {
    router.back();
}
</script>

<style scoped>
</style>